home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-09-07 | 7.9 KB | 249 lines | [TEXT/MPS ] |
- /*
- File: AlbumInfoPage.r
-
- Contains: Information page resources for album sample template
-
- Written by: Harry Chesley, Steve Fisher, Bruce Gaya
-
- Copyright: © 1993 by Apple Computer, Inc., all rights reserved.
-
- Change History (most recent first):
-
- 5/6/93 BG revised for 1993 WWDC
-
- To Do:
- */
-
- #include "Types.r"
- #include "OCETemplates.h"
- #include "OCE.r"
-
- // --------------------------------------------------------------------
- // --------------------------------------------------------------------
- //
- // Album Main Aspect
- //
- // --------------------------------------------------------------------
- // --------------------------------------------------------------------
-
-
- /////////////////////////////////////////////////////////////////////////
- //
- // BOOKKEEPING - this is an aspect template with this base resource id
- //
- /////////////////////////////////////////////////////////////////////////
-
- #define kAlbumMainAspect kDETFirstID
-
- resource 'deta' (kAlbumMainAspect, purgeable) {
- 0, // Drop priority
- dropCheckAlways, // Drop check flag
- isMainAspect // Is the main aspect
- };
-
- resource 'rstr' (kAlbumMainAspect+kDETTemplateName, purgeable) {
- "Album Main Aspect"
- };
-
-
- /////////////////////////////////////////////////////////////////////////
- //
- // BINDING - associate this aspect with records of this type
- //
- /////////////////////////////////////////////////////////////////////////
-
- resource 'rstr' (kAlbumMainAspect+kDETRecordType, purgeable) {
- "Album"
- };
-
-
- /////////////////////////////////////////////////////////////////////////
- //
- // BEHAVIOR - record icon’s behaviour
- //
- /////////////////////////////////////////////////////////////////////////
-
- resource 'rst#' (kAlbumMainAspect+kDETAspectCategory,purgeable)
- {{
- "Recordings"
- }};
-
- resource 'rstr' (kAlbumMainAspect+kDETAspectNewMenuName, purgeable) {
- "New Album"
- };
-
- resource 'rstr' (kAlbumMainAspect+kDETAspectNewEntryName, purgeable) {
- "untitled album"
- };
-
-
- /////////////////////////////////////////////////////////////////////////
- //
- // USER INTERFACE RESOURCES - for looking good
- //
- /////////////////////////////////////////////////////////////////////////
-
- resource 'rstr' (kAlbumMainAspect+kDETAspectKind, purgeable) {
- "album (info page)"
- };
-
- resource 'rstr' (kAlbumMainAspect+kDETAspectWhatIs, purgeable) {
- "Album\n\nA description of an album."
- };
-
-
- // icons
-
- include "AlbumIcons" 'ICN#'(0) as 'ICN#'(kAlbumMainAspect+kDETAspectMainBitmap, purgeable);
- include "AlbumIcons" 'icl4'(0) as 'icl4'(kAlbumMainAspect+kDETAspectMainBitmap, purgeable);
- include "AlbumIcons" 'icl8'(0) as 'icl8'(kAlbumMainAspect+kDETAspectMainBitmap, purgeable);
- include "AlbumIcons" 'ics#'(0) as 'ics#'(kAlbumMainAspect+kDETAspectMainBitmap, purgeable);
- include "AlbumIcons" 'ics4'(0) as 'ics4'(kAlbumMainAspect+kDETAspectMainBitmap, purgeable);
- include "AlbumIcons" 'ics8'(0) as 'ics8'(kAlbumMainAspect+kDETAspectMainBitmap, purgeable);
- include "AlbumIcons" 'SICN'(0) as 'SICN'(kAlbumMainAspect+kDETAspectMainBitmap, purgeable);
-
-
- // --------------------------------------------------------------------
- // --------------------------------------------------------------------
- //
- // Album Information Page
- //
- // --------------------------------------------------------------------
- // --------------------------------------------------------------------
-
-
- /////////////////////////////////////////////////////////////////////////
- //
- // BOOKKEEPING - this is an information page template with this base resource id
- // and this view
- //
- /////////////////////////////////////////////////////////////////////////
-
- #define kAlbumInfoPage kDETSecondID
-
-
- resource 'deti' (kAlbumInfoPage, purgeable) {
- 1000,
- {0, 0, 0, 0},
- selectFirstText,
- {
- kDETNoProperty, kDETNoProperty, kAlbumInfoPage;
- },
- {
- }
- };
-
- resource 'rstr' (kAlbumInfoPage+kDETTemplateName, purgeable) {
- "Album 1st Info Page"
- };
-
- resource 'rstr' (kAlbumInfoPage+kDETInfoPageName, purgeable) {
- "General Info"
- };
-
-
- /////////////////////////////////////////////////////////////////////////
- //
- // BINDING - associate this information page with records of this type
- // and with this aspect
- //
- /////////////////////////////////////////////////////////////////////////
-
- resource 'rstr' (kAlbumInfoPage+kDETRecordType, purgeable) {
- "Album"
- };
-
- resource 'rstr' (kAlbumInfoPage+kDETInfoPageMainViewAspect, purgeable) {
- "Album Main Aspect"
- };
-
-
-
- /////////////////////////////////////////////////////////////////////////
- //
- // VIEWS - what you see in this information page
- //
- /////////////////////////////////////////////////////////////////////////
-
- #define kCoverTop (kDETSubpageIconBottom + 8)
- #define kCoverLeft (kDETSubpageIconLeft-2)
- #define kCoverBottom (kCoverTop + 175)
- #define kCoverRight (kCoverLeft + 175)
-
- #define k1stColumnLeft (kCoverRight+4)
- #define k1stColumnRight (k1stColumnLeft+65)
- #define k2ndColumnLeft (k1stColumnRight+4)
- #define k2ndColumnRight (kDETRecordInfoWindWidth - 8)
-
- #define kTitleTop (kCoverTop)
- #define kTitleBottom (kTitleTop + kDETAppFontLineHeight + 4)
- #define kArtistTop (kTitleBottom + 6)
- #define kArtistBottom (kArtistTop + kDETAppFontLineHeight + 4)
- #define kFormatTop (kArtistBottom + 6)
- #define kFormatBottom (kFormatTop + kDETAppFontLineHeight + 4)
- #define kNumFormats (3)
- #define kCDRadioLeft (k2ndColumnLeft)
- #define kCDRadioRight (kCDRadioLeft + 35)
- #define kCassetteRadioLeft (kCDRadioRight)
- #define kCassetteRadioRight (kCassetteRadioLeft + 60)
- #define kVinylRadioLeft (kCassetteRadioRight)
- #define kVinylRadioRight (k2ndColumnRight)
- #define kCommentsTop (kFormatBottom + 32)
- #define kCommentsLabelBottom (kCommentsTop + kDETAppFontLineHeight + 4)
- #define kCommentsBottom (kCoverBottom)
-
-
- resource 'detv' (kAlbumInfoPage, purgeable) {
- {
- kDETSubpageIconRect, kDETNoFlags, kDETAspectMainBitmap,
- Bitmap { kDETLargeIcon };
-
-
- {kTitleTop, k1stColumnLeft, kTitleBottom, k1stColumnRight}, kDETNoFlags, kDETNoProperty,
- StaticTextFromView { kDETApplicationFont, kDETApplicationFontSize, kDETRight, kDETBold,
- "Full title:" };
-
- {kTitleTop-2, k2ndColumnLeft, kTitleBottom-2, k2ndColumnRight}, kDETEnabled, kDETNoProperty,
- EditText { kDETApplicationFont, kDETApplicationFontSize, kDETLeft, kDETNormal };
-
-
- {kArtistTop, k1stColumnLeft, kArtistBottom, k1stColumnRight}, kDETNoFlags, kDETNoProperty,
- StaticTextFromView { kDETApplicationFont, kDETApplicationFontSize, kDETRight, kDETBold,
- "Artist:" };
-
- {kArtistTop-2, k2ndColumnLeft, kArtistBottom-2, k2ndColumnRight}, kDETEnabled, kDETNoProperty,
- EditText { kDETApplicationFont, kDETApplicationFontSize, kDETLeft, kDETNormal };
-
-
- {kFormatTop, k1stColumnLeft, kFormatBottom, k1stColumnRight}, kDETNoFlags, kDETNoProperty,
- StaticTextFromView { kDETApplicationFont, kDETApplicationFontSize, kDETRight, kDETBold,
- "Format:" };
-
- {kFormatTop, kCDRadioLeft, kFormatBottom, kCDRadioRight}, kDETEnabled, kDETNoProperty,
- RadioButton { kDETApplicationFont, kDETApplicationFontSize, kDETLeft, kDETNormal,
- "CD", kDETNoProperty, 1 };
-
- {kFormatTop, kCassetteRadioLeft, kFormatBottom, kCassetteRadioRight}, kDETEnabled, kDETNoProperty,
- RadioButton { kDETApplicationFont, kDETApplicationFontSize, kDETLeft, kDETNormal,
- "Cassette", kDETNoProperty, 2 };
-
- {kFormatTop, kVinylRadioLeft, kFormatBottom, kVinylRadioRight}, kDETEnabled, kDETNoProperty,
- RadioButton { kDETApplicationFont, kDETApplicationFontSize, kDETLeft, kDETNormal,
- "Vinyl", kDETNoProperty, 3 };
-
- {kCommentsTop, k1stColumnLeft, kCommentsLabelBottom, k1stColumnRight}, kDETNoFlags, kDETNoProperty,
- StaticTextFromView { kDETApplicationFont, kDETApplicationFontSize, kDETRight, kDETBold,
- "Comments:" };
-
- {kCommentsLabelBottom, k1stColumnLeft, kCommentsBottom-2, k2ndColumnRight}, kDETEnabled + kDETMultiLine, kDETNoProperty,
- EditText { kDETApplicationFont, kDETApplicationFontSize, kDETLeft, kDETNormal };
-
- { kCoverTop, kCoverLeft, kCoverBottom, kCoverRight }, kDETNoFlags, kDETNoProperty,
- Box { kDETBoxIsGrayed };
-
- { kCoverTop, kCoverLeft, kCoverBottom, kCoverRight }, kDETNoFlags, kDETNoProperty,
- EditPicture { 8 };
- }
- };
-
-